home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / src / X11 / xmcd-1.4 / libdi.d / os_sun.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-05-10  |  2.4 KB  |  84 lines

  1. /*
  2.  *   libdi - CD Audio Player Device Interface Library
  3.  *
  4.  *   Copyright (C) 1995  Ti Kan
  5.  *   E-mail: ti@amb.org
  6.  *
  7.  *   This program is free software; you can redistribute it and/or modify
  8.  *   it under the terms of the GNU General Public License as published by
  9.  *   the Free Software Foundation; either version 2 of the License, or
  10.  *   (at your option) any later version.
  11.  *
  12.  *   This program is distributed in the hope that it will be useful,
  13.  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
  14.  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15.  *   GNU General Public License for more details.
  16.  *
  17.  *   You should have received a copy of the GNU General Public License
  18.  *   along with this program; if not, write to the Free Software
  19.  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  20.  *
  21.  *   This software module contains code that interfaces the CD player
  22.  *   application to the SunOS operating systems.  The name "Sun" and
  23.  *   "SunOS" are used here for identification purposes only.  This
  24.  *   software and its author are not affiliated with Sun Microsystems.
  25.  */
  26. #ifndef __OS_SUN_H__
  27. #define __OS_SUN_H__
  28.  
  29. #if defined(sun) && defined(DI_SCSIPT) && !defined(DEMO_ONLY)
  30.  
  31. #ifndef LINT
  32. static char *_os_sun_h_ident_ = "@(#)os_sun.h    5.4 94/12/28";
  33. #endif
  34.  
  35. #ifdef SVR4
  36.  
  37. #include <sys/scsi/impl/uscsi.h>
  38. #include <sys/dkio.h>
  39.  
  40. #define SOL2_VOLMGT            /* Enable Solaris Vol Mgr support */
  41.  
  42. #define USCSI_STATUS_GOOD    0
  43.  
  44. #else    /* !SVR4 */
  45.  
  46. #include <scsi/impl/uscsi.h>
  47. #undef USCSI_WRITE
  48. #define USCSI_WRITE        0
  49.  
  50. /* This is a hack to work around a bug in SunOS 4.x's _IOWR macro
  51.  * in <sys/ioccom.h> which makes it incompatible with ANSI compilers.
  52.  * If Sun ever changes the definition of USCSICMD or _IOWR then
  53.  * this will have to change...
  54.  */
  55. #undef _IOWR
  56. #undef USCSICMD
  57.  
  58. #define _IOWR(x,y,t)    ( \
  59.                 _IOC_INOUT | \
  60.                 ((sizeof(t) & _IOCPARM_MASK) << 16) | \
  61.                 ((x) << 8) | (y) \
  62.             )
  63. #define USCSICMD    _IOWR('u', 1, struct uscsi_cmd)
  64.  
  65. #endif    /* SVR4 */
  66.  
  67.  
  68. #define OS_MODULE    /* Indicate that this is compiled on a supported OS */
  69. #define SETUID_ROOT    /* Setuid root privilege is required */
  70.  
  71.  
  72. /* Public function prototypes */
  73. extern bool_t    pthru_send(byte_t, word32_t, byte_t *, word32_t, byte_t,
  74.             word32_t, byte_t, byte_t, byte_t, bool_t);
  75. extern bool_t    pthru_open(char *);
  76. extern void    pthru_close(void);
  77. extern char    *pthru_vers(void);
  78. extern bool_t    sol2_volmgt_eject(void);
  79.  
  80. #endif    /* sun DI_SCSIPT DEMO_ONLY */
  81.  
  82. #endif    /* __OS_SUN_H__ */
  83.  
  84.